package com.jxufe;

import java.util.Random;

public class stringtest {
    public static void main(String[] args) {
        String total="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
        int num=5;
        String yanzhengma="";
        Random random =new Random();
        for (int i = 0; i <5; i++) {
            int r = random.nextInt(total.length());
            char c = total.charAt(r);
            yanzhengma+=c;
        }
        System.out.println(yanzhengma);
    }
}
